package com.java.component;

import lombok.extern.slf4j.Slf4j;

/**
 * @Author: TongRui乀
 * @Date: 2019-12-13 10:43
 * @description：
 */
@Slf4j
public class CoconutCoffee extends BeverageComponent {

    Coffe coffee = new Coffe();

    public CoconutCoffee(Coffe coffee){
        this.coffee = coffee;
    }

    @Override
    public void addSugar() {
      log.info("单独加糖");
    }

    @Override
    public String description() {
        return coffee.description() + "加椰果";
    }

    @Override
    public int price() {
        return coffee.price() + 20;
    }
}
